{extend name="layout" /}
{block name="content"}
    <div class="layui-form" lay-filter="LAY-set-slide-item-form" id="LAY-set-slide-item-form" style="padding: 20px 30px 0 0;">
        <div class="layui-form-item">
            <label class="layui-form-label">名称</label>
            <div class="layui-input-inline">
                <input type="text" name="title" value="{$item.title|default=''}" lay-verify="required"
                       placeholder="请输入..." autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">图片</label>
            <div class="layui-input-inline">
                <input type="text" name="image" value="{$item.image|default=''}" lay-verify="required"
                       placeholder="请上传图片" autocomplete="off" class="layui-input" id="picture">
            </div>
            <button style="float: left;" type="button" class="layui-btn" onClick="upImage()">上传图片</button>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">链接</label>
            <div class="layui-input-inline">
                <input type="text" name="url" value="{$item.url|default=''}" placeholder="请输入..." autocomplete="off"
                       class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-inline">
                <input type="number" name="sort" value="{$item.sort|default=0}" lay-verify="required"
                       placeholder="请输入..." autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-inline">
                <select name="status" lay-verify="required">
                    <option value="1" {if $item && $item.status == '1'}selected{/if}>启用</option>
                    <option value="0" {if $item && $item.status == '0'}selected{/if}>禁用</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item layui-hide">
            <input type="button" lay-submit lay-filter="LAY-set-slide-item-submit" id="LAY-set-slide-item-submit" value="确认">
        </div>
    </div>
{include file='editor' /}
{/block}
{block name="js"}
    <script>
        layui.use(['index', 'form'], function(){
            var $ = layui.$
                ,form = layui.form ;
        })
    </script>
{/block}